Trees | Indices | Toggle frames |
---|
TextLayout --+ | ScrollableTextLayout
Display text in a scrollable viewport.
This class does not display a scrollbar or handle scroll events; it merely clips the text that would be drawn in TextLayout to the bounds of the layout given by x, y, width and height; and offsets the text by a scroll offset.
Use view_x and view_y to scroll the text within the viewport.
__init__(self,
document,
width,
height,
multiline=False,
dpi=None,
batch=None,
group=None)
Create a text layout.
|
|
begin_update(self)
Indicate that a number of changes to the layout or document
are about to occur.
(Inherited from pyglet.text.layout.TextLayout)
|
|
delete(self)
Remove this layout from its batch.
(Inherited from pyglet.text.layout.TextLayout)
|
|
draw(self)
Draw this text layout.
(Inherited from pyglet.text.layout.TextLayout)
|
|
end_update(self)
Perform pending layout changes since begin_update.
(Inherited from pyglet.text.layout.TextLayout)
|
|
on_delete_text(self,
start,
end)
Event handler for
(Inherited from pyglet.text.layout.TextLayout)
AbstractDocument.on_delete_text . |
|
on_insert_text(self,
start,
text)
Event handler for
(Inherited from pyglet.text.layout.TextLayout)
AbstractDocument.on_insert_text . |
|
on_style_text(self,
start,
end,
attributes)
Event handler for
(Inherited from pyglet.text.layout.TextLayout)
AbstractDocument.on_style_text . |
int |
x
X coordinate of the layout.
|
int |
y
Y coordinate of the layout.
|
int |
width
Width of the layout.
|
int |
height
Height of the layout.
|
str |
anchor_x
Horizontal anchor alignment.
|
str |
anchor_y
Vertical anchor alignment.
|
int |
view_x
Horizontal scroll offset.
|
int |
view_y
Vertical scroll offset.
|
str |
content_valign
Vertical alignment of content within
larger layout box.
(Inherited from pyglet.text.layout.TextLayout)
|
document (Inherited from pyglet.text.layout.TextLayout) | |
float |
dpi
Get DPI used by this layout.
(Inherited from pyglet.text.layout.TextLayout)
|
bool |
multiline
Set if multiline layout is enabled.
(Inherited from pyglet.text.layout.TextLayout)
|
Group |
background_group = OrderedGroup(0)
Rendering group for background color.
(Inherited from pyglet.text.layout.TextLayout)
|
int |
content_height
Calculated height of the text in the layout.
(Inherited from pyglet.text.layout.TextLayout)
|
int |
content_width
Calculated width of the text in the layout.
(Inherited from pyglet.text.layout.TextLayout)
|
Group |
foreground_decoration_group = TextLayoutForegroundDecorationGr
Rendering group for glyph underlines.
(Inherited from pyglet.text.layout.TextLayout)
|
Group |
foreground_group = TextLayoutForegroundGroup(1)
Rendering group for glyphs.
(Inherited from pyglet.text.layout.TextLayout)
|
Group |
top_group = <pyglet.text.layout.TextLayoutGroup object at 0xfa
Top-level rendering group.
(Inherited from pyglet.text.layout.TextLayout)
|
Horizontal anchor alignment.
This property determines the meaning of the x coordinate. It is one of the enumerants:
For the purposes of calculating the position resulting from this alignment, the width of the layout is taken to be width if multiline is True, otherwise content_width.
Vertical anchor alignment.
This property determines the meaning of the y coordinate. It is one of the enumerants:
For the purposes of calculating the position resulting from this alignment, the height of the layout is taken to be the smaller of height and content_height.
See also content_valign.
Horizontal scroll offset.
The initial value is 0, and the left edge of the text will touch the left side of the layout bounds. A positive value causes the text to "scroll" to the right. Values are automatically clipped into the range [0, content_width - width]
Vertical scroll offset.
The initial value is 0, and the top of the text will touch the top of the layout bounds (unless the content height is less than the layout height, in which case content_valign is used).
A negative value causes the text to "scroll" upwards. Values outside of the range [height - content_height, 0] are automatically clipped in range.
Trees | Indices | Toggle frames |
---|
Generated by Epydoc 3.0beta1 on Thu Dec 31 17:58:20 2009 | http://epydoc.sourceforge.net |